﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DeviceManagement.aspx.cs" Inherits="bts_webapp.DeviceManagement" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2011.2.915.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div style="clear:both;">
        <h2> Quản lý thiết bị </h2>
    </div>
    
    <div>
        <asp:ScriptManager ID="scriptMan" runat="server" />

        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Windows7" />

        <telerik:RadGrid Skin="Windows7" runat="server" ID="RadGrid1" AutoGenerateColumns="false" OnItemCommand="RadGrid1_ItemCommand"
            AllowPaging="true" OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"
            OnItemCreated="RadGrid1_ItemCreated" OnDeleteCommand="RadGrid1_DeleteCommand" AllowSorting="true"
            OnInsertCommand="RadGrid1_InsertCommand" OnItemDataBound="RadGrid1_ItemDataBound" AllowFilteringByColumn="True">
            <MasterTableView CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage">
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="ColumnEdit" />

                    <telerik:GridBoundColumn DataField="ThietBi_Id" ItemStyle-Width="6%" HeaderText="Mã thiết bị" UniqueName="ThietBi_Id" SortExpression="ThietBi_Id" Visible="False" />
                    <telerik:GridBoundColumn DataField="ThietBi_Ten" ItemStyle-Width="14%" HeaderText="Tên thiết bị" UniqueName="ThietBi_Ten" SortExpression="ThietBi_Ten" />
                    <telerik:GridBoundColumn DataField="ThietBi_NhanHieu" HeaderText="Nhãn hiệu" UniqueName="ThietBi_NhanHieu" SortExpression="ThietBi_NhanHieu" />
                    <%--<telerik:GridBoundColumn DataField="ThietBi_TenCard" HeaderText="Tên card" UniqueName="ThietBi_TenCard" SortExpression="ThietBi_TenCard" />--%>
                   <%-- <telerik:GridBoundColumn DataField="ThietBi_SoPort" HeaderText="Số port" UniqueName="ThietBi_SoPort" SortExpression="ThietBi_SoPort" />--%>
                    <telerik:GridBoundColumn DataField="Tram_Id" HeaderText="Mã trạm" UniqueName="Tram_Id" Visible="False" />
                    <telerik:GridBoundColumn HeaderText="Tên trạm" UniqueName="Tram_Ten" />
                    <telerik:GridBoundColumn DataField="ThietBi_GhiChu" HeaderText="Ghi chú" UniqueName="ThietBi_GhiChu" />
                    <telerik:GridBoundColumn DataField="Status" HeaderText="Trạng thái" UniqueName="Status" SortExpression="Status" AllowFiltering="false" />
                    

                    <telerik:GridButtonColumn ConfirmText="Bạn có muốn xóa trạm này ?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" UniqueName="ColumnDelete" />
                </Columns>
                <EditFormSettings EditFormType="WebUserControl" UserControlName="~/UxDevice.ascx">
                    <EditColumn ButtonType="ImageButton" />
                </EditFormSettings>
            </MasterTableView>

            <PagerStyle Mode="NextPrevNumericAndAdvanced" />
            
        </telerik:RadGrid>

    </div>
</asp:Content>
